The log manager class attached to this component. More...
Public Member Functions | |
LogManager () | |
~LogManager () | |
void | setReceiver (nkLog::Logger *receiver) |
nkLog::Logger * | getReceiver () const |
void | log (const std::string_view &message, const std::string_view &className) |
Friends | |
class | nkCommon::SingletonClass< LogManager > |
The log manager class attached to this component.
If any part of the component has to notify the user about something, it will do so by calling this class. By setting a Logger, the user is able to reroute those messages to wherever it is suitable.
nkResources::LogManager::LogManager | ( | ) |
Constructor.
nkResources::LogManager::~LogManager | ( | ) |
Destructor.
void nkResources::LogManager::setReceiver | ( | nkLog::Logger * | receiver | ) |
Sets the logger active for this component's log manager.
receiver | The logger that will be used to dispatch messages logged by this component. |
nkLog::Logger* nkResources::LogManager::getReceiver | ( | ) | const |
void nkResources::LogManager::log | ( | const std::string_view & | message, |
const std::string_view & | className | ||
) |
Logs a message and dispatches it to the attached receiver.
message | The message to log. |
className | The class calling this function, or any contextual information helping to localize the logged message. |